Carbon


MPSignalSemaphore

Header: Multiprocessing.h Carbon status: Supported

Signals a semaphore.

OSStatus MPSignalSemaphore (
    MPSemaphoreID semaphore
);
semaphore

The ID of the semaphore you want to signal.

function result

A result code. If the value of the semaphore was already at the maximum, MPSignalSemaphore returns kInsufficientResourcesErr.

DISCUSSION

If tasks are waiting on the semaphore, the oldest (first queued) task is unblocked so that the corresponding MPWaitOnSemaphore call for that task completes. Otherwise, if the value of the semaphore is not already equal to its maximum value, it is incremented by one.

Note that you can call this function from an interrupt handler.

VERSION NOTES

Introduced with Multiprocessing Services 1.0.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when MPLibrary 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by MPLibrary 1.0 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/6/2000)